home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_20_(11-1984).d64
/
time clock_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
1KB
|
42 lines
100 Y=PEEK(49269):IFY<>141THENGOSUB270
110 POKE56335,0:PRINT"[147]":INPUT"AM OR PM (A[146]/P[146])";A$
120 IF A$<>"A" AND A$<>"P" THEN 110
130 B=0:IF A$="P" THEN B=128
140 INPUT"TIME (HHMMSS FORMAT)";T$
150 IF LEN(T$)<>6 THEN 140
160 IF VAL(LEFT$(T$,2))>12 THEN 250
170 IF VAL(MID$(T$,3,2))>59 OR VAL(MID$(T$,5,2))>59 THEN 250
180 FORA=1TO5STEP2:D=VAL(MID$(T$,A,1)):D=D*16+VAL(MID$(T$,A+1,1))
190 POKE49154-(A-1)/2,D:NEXTA
200 IF LEFT$(T$,2)="12" THEN B=128-B
210 POKE49154,PEEK(49154)AND127:POKE49154,PEEK(49154)ORB
220 PRINT" PRESS ANY KEY TO START CLOCK"
230 GET A$:IF A$="" THEN 230
240 PRINT"[147]":SYS49155:END
250 PRINT"ERROR IN INPUT.":FORI=1TO1000:NEXT:GOTO140
260 REM ML LOADER
270 I=49155
280 READ A:IF A=256 THEN 300
290 POKE I,A:I=I+1:X=X+A:GOTO 280
300 IF X<>13794 THEN PRINT"ERROR IN DATA STATEMENTS.":END
310 DATA 162,3,189,255
320 DATA 191,157,8,220,202,208,247
330 DATA 169,0,141,8,220,120,169
340 DATA 32,141,20,3,169,192,141
350 DATA 21,3,88,96,169,58,141
360 DATA 29,4,173,134,2,141,29
370 DATA 216,162,3,160,0,189,8
380 DATA 220,41,112,74,74,74,74
390 DATA 24,105,176,153,30,4,173
400 DATA 134,2,153,30,216,200,189
410 DATA 8,220,41,15,24,105,176
420 DATA 153,30,4,173,134,2,153
430 DATA 30,216,200,202,208,213,173
440 DATA 8,220,24,105,176,141,37
450 DATA 4,173,134,2,141,37,216
460 DATA 173,11,220,48,5,169,1
470 DATA 76,117,192,169,16,141,39
480 DATA 4,173,134,2,141,39,216
490 DATA 76,49,234,0,256
500 RETURN